//
//  YCUserDefaults.h
//  Pods
//
//  Created by Apple on 2022/11/12.
//

#import <Foundation/Foundation.h>

NS_ASSUME_NONNULL_BEGIN

@interface YCUserDefaults : NSObject

+ (nullable id)objForKey:(NSString *_Nonnull)key;
+ (void)setObject:(nullable id)value forKey:(NSString *_Nonnull)key;
+ (void)removeObjForKey:(NSString *_Nonnull)key;

#pragma mark --- 取 ----
+ (NSInteger)intForKey:(NSString *_Nonnull)key;
+ (CGFloat)floatForKey:(NSString *_Nonnull)key;
+ (double)doubleForKey:(NSString *_Nonnull)key;
+ (BOOL)boolForKey:(NSString *_Nonnull)key;
+ (nullable NSURL *)urlForKey:(NSString *_Nonnull)key API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));

#pragma mark --- 存 ---
+ (void)setInteger:(NSInteger)value forKey:(NSString *_Nonnull)key;
+ (void)setFloat:(CGFloat)value forKey:(NSString *_Nonnull)key;
+ (void)setDouble:(double)value forKey:(NSString *_Nonnull)key;
+ (void)setBool:(BOOL)value forKey:(NSString *_Nonnull)key;
+ (void)setUrl:(nullable NSURL *)url forKey:(NSString *_Nonnull)key API_AVAILABLE(macos(10.6), ios(4.0), watchos(2.0), tvos(9.0));

@end

NS_ASSUME_NONNULL_END
